package com.tool_stdy.IO.BIO;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

/**
 * Created by yan_li on 2017/1/9.
 */
public class Client {

    public static void main(String[] args) throws IOException, InterruptedException {
        Socket socker = new Socket("localhost", 8080);

        OutputStream outputStream = socker.getOutputStream();
        Thread.sleep(10000);
        outputStream.write("Client".getBytes());
        outputStream.flush();
//        outputStream.close();
//        Thread.sleep(10000);
        outputStream.write("Client====》".getBytes());
        outputStream.close();
    }
}
